package com.chinasoft.service.impl;

import com.chinasoft.dao.BookDao;
import com.chinasoft.dao.UserDao;
import com.chinasoft.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

@Service("userService")
@Scope("singleton")
public class UserServiceImpl implements UserService {


    @Value("4")
    private int num;

    @Value("1.0")

    private String version;

    @Autowired
    private UserDao userDao;

    @Autowired
    private BookDao bookDao;

    @Override
    public void save() {

        System.out.println("user service running .. " + num + version);

        userDao.save();
        bookDao.save();
    }

}
